package com.situ.web.service.impl;

import com.situ.web.dao.IUserDao;
import com.situ.web.dao.impl.UserDaoImpl;
import com.situ.web.entity.User;
import com.situ.web.service.IUserService;

public class UserServiceImpl implements IUserService {
	private IUserDao userDao = new UserDaoImpl();
	
	@Override
	public User login(String name, String password) {
		return userDao.login(name,password);
	}

	@Override
	public boolean register(String name, String password) {
		int count = userDao.register(name,password);
		return count == 1 ? true : false;
	}

	@Override
	public User selectByName(String name) {
		return userDao.selectByName(name);
	}


	

}
